package com.example.forum.mapper;

import com.example.forum.model.Article;
import com.example.forum.model.ArticleReply;
import com.example.forum.model.Board;
import lombok.Data;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleMapper {
    int insert(Article record);

    int insertSelective(Article record);

    Article selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Article record);

    int updateByPrimaryKeyWithBLOBs(Article record);

    int updateByPrimaryKey(Article record);

    List<Article> selectAll();

    List<Article> selectByBoardId(Long boardId);

    Article selectDetailById(Long id);

    List<Article> selectByUserId(Long userId);


}